Unassign Numbers
This request enables you to unassign numbers that have been assigned to a user. Once unassigned, the number can be reassigned to another user. Assigned numbers must be unassigned before they can be released (see Release Numbers from Customer). Numbers are unassigned from customer users in their Teams admin center ('Phone Numbers' tab).
For OC Essentials + and OC Pro customers, ensure you have a secure Token connection for synchronization between Live Platform and Microsoft Teams.
URI
{{baseUrl}}/api/v2/oc/numbers/action/unassign?msTenantId={{msTenantId}}
HTTP Method
POST
Request Parameters
Parameter |
Type |
Description |
---|---|---|
msTenantId |
string |
Microsoft subscription Customer Tenant Id. |
Request Body
The Query Body includes the phone number that you wish to unassign
Phone number validation rules are in accordance with E.164. The E.164 format requires the following:
■ | A + sign. |
■ | Country calling code (international). |
■ | Local area code. |
Local telephone number or subscriber number.
It has the following structure: [+][country code][area code][subscriber number].
Example of a number with E.164 format in the United States:
Telephone number: 415 123 1234
E.164 format number: +14151231234
■ | Country code: +1 |
■ | Area code: 415 |
Phone number ranges should be configured as follows:
Example Request
Request to unassign the highlighted number from the customer tenant user.
{
"telephoneNumbers": [
"+61398675570"
]
}
Example Response
The initial response displays the Task Id.
Parameter |
Type |
Description |
---|---|---|
taskId |
string |
The queued task Id that is generated for this action. You must run the Task request to retrieve the status of the action. See Task Status. Note that the tsk_ms_job string in the prefix is unique for this endpoint. |
{
"tsk_msjob_0a57213a-351a-42cc-92db-c00eb29fb465"
}
The execution of the request may take a few minutes. The status will progress from 'In Progress' to 'Completed Success'.
{
"id": "de39140b-e3b2-49d6-a57d-4830ab4ab250",
"status": "Success",
"executionMessages": [],
"outputData": {
"telephoneNumbers": [
{
"telephoneNumber": "+61398675570",
"status": "Success",
"errorCode": 0,
"errorMessage": null
}
]
},
"createTime": "2024-04-11T16:25:20.8748039+00:00"
}
HTTP Responses
■ | 200 OK |
Parameter |
Type |
Description |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
totalNumbersCount |
integer |
Total number of numbers unassigned. |
||||||||||||
id |
string |
The task Id that is generated for this action. See Task Status. |
||||||||||||
status |
string |
Aggregated status reflecting update status on both the Live Platform and Operator Connect:
|
||||||||||||
executionMessages |
null |
Internal debugging messages. | ||||||||||||
outputData |
list array |
List array including the following parameters:
|
||||||||||||
telephoneNumber |
string |
Telephone numbers that have been unassigned. |
||||||||||||
status |
string |
Indicates the status of the request:
|
||||||||||||
errorCode |
integer |
- |
||||||||||||
errorMessage |
string |
Additional information. |